package cn.org.donald.framework.pojo.dto;

import cn.org.donald.framework.base.BaseModel;
import cn.org.donald.framework.validate.Insert;
import cn.org.donald.framework.validate.Update;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author ： Donald
 * @date ： 2020/11/17 21:25
 * @description：
 */
public class UserDto extends BaseModel {

    @NotNull(groups = {Update.class}, message = "id不能为空!")
    private Long id;

    @NotBlank(groups = {Insert.class}, message = "用户名不能为空!")
    private String userName;

    private String nickName;

    private Integer sex;

    private String realName;

    @NotBlank(groups = {Insert.class}, message = "邮箱不能为空!")
    private String email;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
